I have some fairly complex reports that i am running from a VB 6 application (reporting from a SQL 2000 DB). The client wants to add the ability to view these reports from their web server.
The problem is that in my vb app i am generating a sql statement based on the parameters chosen on the vb forms and setting the .SQLQuereyString property of the report to that sql statement. With the web reports you don't have that kind of control over the report objects. You can feed it paramaters for a report like this:
-------------------------------------------------------------------------
<form method="POST" action=" <p>From: <input type="text" name="prompt0"
<p> To: <input type="text" name="prompt1"</p>
<p> Exclude Product Group: <input type="text" name="prompt2"</p>
<p> Production Center: <input type="text" name="prompt3"</p>
<p> Include C1: <input type="text" name="prompt4"</p>
<p> Include C2: <input type="text" name="prompt5"</p>
<p> Include C3: <input type="text" name="prompt6"</p>
<p> Include C4: <input type="text" name="prompt7"</p>
<p> Summary Only: <input type="text" name="prompt8"</p>
<p> Include Misc. Invoice: <input type="text" name="prompt9"</p>
<p><input type="submit" value="View Report"></p>
which places some values from text boxes on the webpage into parameter fields in the report (i wasn't using parameters at all in VB but took the sql statement being generated by VB, removed the where clause, put it into the report, and added a record selection formula using new paramater fields). The report printed correctly after 15 minutes. Obviously that is not an acceptable amount of time to wait. I can't schedule the reports with preset parameters. My next thought was to get rid of the record selection formula and use the parameter fields directly in the sql statement. I changed the date parameters to strings and assigned them these values (including the single quotes):
{?SDate} = '06/12/2001'
{?EDate} = '06/12/2001'
And inserted them into the report's SQL Querey like this
WHERE
Production."date" >= {?SDate} And Production."date" <= {?EDate}
This gives me the following errors:
"ODBC Error:[Microsoft][ODBC SQL Server Driver]syntax error or access violation"
and the standard:
"Error Reported by database DLL"
has anyone used parameter fields in the sql querey?
Any Ideas?
TIA
Ruairi
Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
The problem is that in my vb app i am generating a sql statement based on the parameters chosen on the vb forms and setting the .SQLQuereyString property of the report to that sql statement. With the web reports you don't have that kind of control over the report objects. You can feed it paramaters for a report like this:
-------------------------------------------------------------------------
<form method="POST" action=" <p>From: <input type="text" name="prompt0"
<p> To: <input type="text" name="prompt1"</p>
<p> Exclude Product Group: <input type="text" name="prompt2"</p>
<p> Production Center: <input type="text" name="prompt3"</p>
<p> Include C1: <input type="text" name="prompt4"</p>
<p> Include C2: <input type="text" name="prompt5"</p>
<p> Include C3: <input type="text" name="prompt6"</p>
<p> Include C4: <input type="text" name="prompt7"</p>
<p> Summary Only: <input type="text" name="prompt8"</p>
<p> Include Misc. Invoice: <input type="text" name="prompt9"</p>
<p><input type="submit" value="View Report"></p>
which places some values from text boxes on the webpage into parameter fields in the report (i wasn't using parameters at all in VB but took the sql statement being generated by VB, removed the where clause, put it into the report, and added a record selection formula using new paramater fields). The report printed correctly after 15 minutes. Obviously that is not an acceptable amount of time to wait. I can't schedule the reports with preset parameters. My next thought was to get rid of the record selection formula and use the parameter fields directly in the sql statement. I changed the date parameters to strings and assigned them these values (including the single quotes):
{?SDate} = '06/12/2001'
{?EDate} = '06/12/2001'
And inserted them into the report's SQL Querey like this
WHERE
Production."date" >= {?SDate} And Production."date" <= {?EDate}
This gives me the following errors:
"ODBC Error:[Microsoft][ODBC SQL Server Driver]syntax error or access violation"
and the standard:
"Error Reported by database DLL"
has anyone used parameter fields in the sql querey?
Any Ideas?
TIA
Ruairi
Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.