How to make WEB link to custom parameters report
How can I make an web link for my custom parameters report with parameters
like id_org and date.
If I go step by step:
1. open Report Explorer (on web)
2. click on my own AutoSearch Parameters.rtm
3. that opens new page Custom Search Form (mySearchParameterForm.htm)
when I insert my values for parameters id_org and date
4. my report with id_org and date is showen correctly
But I want to have a link with parameter to show my AutoSearch Parameter
report.
http://...????....?id_org=?&date=2004 ??????
like id_org and date.
If I go step by step:
1. open Report Explorer (on web)
2. click on my own AutoSearch Parameters.rtm
3. that opens new page Custom Search Form (mySearchParameterForm.htm)
when I insert my values for parameters id_org and date
4. my report with id_org and date is showen correctly
But I want to have a link with parameter to show my AutoSearch Parameter
report.
http://...????....?id_org=?&date=2004 ??????
This discussion has been closed.
Comments
---------------------------------------------
Tech Tips: How can I request that the webtier
execute a specified report?
---------------------------------------------
Question:
---------
Without using the Web ReportExplorer, how can I request that the webtier
execute a specified report?
Solution:
---------
The webtier processes requests for web content. These requests consists of
1. The URL for the webtier
example: http://127.0.0.1/rbWebPub/report.dll
2. A parameter specifying the content type.
example: content=viewer
{note: content=viewer, is used to request report viewer content.}
3. Additional parameters that are specific to the content request.
volume=Report Forms (the volume name)
Name=Basic\Biolife Table (the full path name to the report)
frameset=1 (show the framset with the toolbar etc., this is required)
Use a web browser to access the webtier demo that displays the report
explorer.
Notice that when you place the mouse over a report in the report explorer
that the status bar in IE shows the url plus some params. That is the string
required to run the report on the web tier.
Example:
http://127.0.0.1/rbWebPub/report.dll?content=viewer&volume=Report
Forms&name=Basic\Biolife Table&framset=1
So the parameters here are
content=viewer (type of content is report viewer)
volume=Report Forms (the volume name)
Name=Basic\Biolife Table (the full path name to the report)
frameset=1 (show the framset with the toolbar etc., this is required)
4. AutoSearch Parameters
To specify autosearch parameters for a report, include the parameter
'newsearch=T' followed by the autosearch parameters.
AutoSearch parameters have the following naming convention: asgXfYse and
asgXfYsa.
The asgX specifies the autosearch group number, where X is the number. The
fY specifies the field number, where Y is the number. The se indicates that
the value is a search expression and the sa specifies that the value is the
"show all" boolean expression.
Example:
content=viewer
newsearch=T
asg0f0se=S
asg0f0sa=false
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
now I can't open or execute some other report.
I have rbReportFormVolumeReg to register an dm0013.pas,... this report uses
sessions for SQL parameters. All works fine. Data is showen correctly. But I
still want to access this report by web link.
I have use your solution but the myLoginPage.htm is showen insted of report
content.
I register my report vith this:
TrsReportCatalog.RegisterReport('pay', 'money', 'ppReport1', Tfrm0013);
Link created if I go step by step (myLoginPage->...Report.dll/Login->money):
http://localhost/rbWebPub/Report.dll?content=viewer&volume=pay&name=money&explorer=static&SessionID={372372E1-C48C-42E0-B86D-0DA2378E023F}
And my link for so registered report should be:
http://127.0.0.1/rbWebPub/Report.dll?content=viewer&volume=pay&name=money&framset=1
But that does not work?????
Please assist me...
http://localhost/rbWebPub/Report.dll?content=viewer&volume=placila&name=placilna-sredstva&explorer=static&SessionID={91CB8913-8937-4717-BAA9-44BCE48ACB17}
1. Compile the RBServer\Demos\Servers\Main\rbServer.dpr application and got
it running within the context of ReportBuilder Services.
2. Compiled and build the RBServer\Demos\Web Tier\Custom
Parameters\Report.dpr application to get Report.dll
3. Performed a simple test to make sure the applications are up are running
propertly. To do this I pasted the following into my web browser
http://127.0.0.1/rbWebPub/report.dll
4. To request a specific report, I pasted in the following and it worked
properly.
http://127.0.0.1/rbWebPub/report.dll?content=viewer&volume=Report Forms&name=Basic\Biolife Table&framset=1
These link does not worf for me. The myLoginPage is showen insted of report.
I have not change nothing, just compiled, bulid and run the demo.
What is wrong?
You need examine the code to the demo and run it within the context of the
Delphi Web debugger.
From looking at the code, the custom parameters demo is designed to display
the login page if a request is made that does not contain a valid SessionId.
In other words the demo has implemented a custom security scheme.
Trace this code.....
function TWebModule1.ProcessDefaultRequest(aWebRequest: TrsWebRequest):
String;
begin
try
if not rsWebTier1.SessionExists(aWebRequest) then
Result := GetLoginPage(aWebRequest)
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
But, sorry I have another question. Like I sad, I am using:
- WebTier
- "Form-based Report Aplication Server" with rbReportFormVolumeReg to
registrate my own reports where I use IBQuery for SQL with parameters like
ID_ORG and DATE.
How can I get these parameters ID_ORG and DATE from htm and use them in SQL?
With sessions there is no problem. All works fine, parameters are passed to
SQL and data is showen correct if I go step by step
(myLoginPage->submit->click on the report->correct data in report).
But how can I do that if I want to execute specific report like web link.
Can I go directly to report when I submit myLoginPage. Not to show
explorer. And is it possible to have on myLoginPage some radio buttons to
check wich report should be shown when I submit it.
Or if there is some other solution to do that, maybe with GET method
http://localhost/rbWebPub/Report.dll?content=viewer&volume=pay&name=money&framset=1?ID_ORG=1?ID_DATUM=2005-2-20
but how to get these new two parameters te be used as SQL parameters???
1. Yes, include the custom parameters with the web request
http://localhost/rbWebPub/Report.dll?content=viewer&volume=pay&name=money&framset=1?ID_ORG=1?ID_DATUM=2005-2-20
The parameters from the web request get parsed and stored to the
TrsWebRequest.ContentParameters[] array.
2. In the WebTier those items will appear in the
TrsWebRequest.ContentParameters array. You can transfer them to the
TrsWebRequest.SessionParameters array. For an example see
TWebModule1.ProcessLoginRequest method in the custom parameters WebTier
demo.
aWebRequest.SessionParameters['ID_ORG'].Value :=
aWebRequest.ContentParameters['ID_ORG'].Value;
3. When WebTier.ProcessWebRequest is called, the parameters will be sent to
the server and you can use them there. To use them in a report, you will
want to use the volume's BeforePublishReport event. For form based reports,
this is a little tricky because the ReportModuleVolume is created
internally. Here is an example of how to assign event-handlers to it..
www.digital-metaphors.com/tips/ReportModuleVolumEventHandlers.zip
4. The BeforePublishReport event has a parameter called aEventParams that is
an object of type TrsBeforePublishReportEventParams. See the online help for
this object, it has properties that provide access to the report,
sessionparameters etc. The custom parameters demo on the server side shows
an example of using this event.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
that my project is workin like I want.
Excellent
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
If I want to execute two reports at the same time, with different Form Based
Reports, the "Connection timed out" message is showen.
I tried Main Server Demo with my Form Based Reports and I have the same
problem if I go step by step (myLoginPage->Report Explorer->execute selected
Report). No matter that two different sessions were created.
If I want to execute two specified reports at the same time
http://localhost/rbWebPub/Report.dll?content=viewer&volume=pay&name=money&framset=1?ID=1?D=2005-2-20
and
http://localhost/rbWebPub/Report.dll?content=viewer&volume=pay&name=money&framset=1?ID=2
two different sessions are created and Connection timed out.
Any idea how to solve this problem?
solved it. Thanx anyway.
Now I can really say that my WebTier application is working 100%. Just tu
get the next maintanence release of ReportBuilder to solve the printing
problem wich I am working with Nico Cizak. Do you maybiy now the date of
release?
Or is it possible to get it now? Because I really need print function .
Thank you again for your help. You really helped me.
I have extract it to RBuilder\Lib and I have deleted all the associated
files (.dcu), compile and build my project, but that does not solve the
printing problem (Access Volation).
If I use Pragnaan PDF there is no printing problem.
Unfortunately we were not able to fix the image printing problem with a
patch. This issue will be addressed for the next release of ReportBuilder.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com