Filtering data in QPLD Report
Hi Guys,
I am using the below query to for getting the Stock in warehouse report.
To get the required result and using filtering option in the report.
But i need to design a QPLD for this report.I need to know if i create a QPLD for this query, shall i filter the data in QPLD like we do in query report.
I need the report for particular warehouses only
Pls give me a solution for the above or update the query..
Actually we are having different locations among which there is different warehouses for different items .
Like in location1 we r having 42 warehouses and location 2 has 34 warehouses..
I need a report based on posting date(given range) and Item Group and Location(single location) and Warehouse in that particular location.But in my query i am getting all the warehouses in that location. So, Pls modify the below query according to the requirement.
[Item code,Item Description,Warehouse name,Location,Item Price,Opening Balance(Stock),In qty(Goods Receipt),OutQty(Goods Issue),Closing Stock,Closing Stock Value(Closing Stock * Item Price)]
select a.ItemCode,a.Des, a.WareHouse ,a.location, (SELECT (sum(t1.inqty - t1.outqty))
FROM OINM t1
WHERE (T1.DocDate < '[%1]') and (t1.itemcode = a.itemcode) and (t1.warehouse = a.whs) ) as 'OB', a.Price,a.inqty,a.outqty, (SELECT (sum(t1.inqty) - sum(t1.outqty))
FROM OINM t1
WHERE (T1.DocDate <= '[%2]') and (t1.itemcode = a.itemcode) and (t1.warehouse = a.whs)) as 'Closing',
(SELECT (sum (t1.transvalue))
FROM OINM t1
WHERE (T1.DocDate <= '[%2]') and (t1.itemcode = a.itemcode) and (t1.warehouse = a.whs)) as 'ClosingValue' from (SELECT T0.[ItemCode] as 'ItemCode', max(T0.[Dscription]) as 'Des',sum(T0.[InQty]) as 'InQty',
sum(T0.[OutQty]) 'OutQty',t0.warehouse as 'whs' ,t0.location as 'loc',
(select w1.whsname from owhs w1 where w1.whscode = t0.warehouse) as 'Warehouse',(select l1.location from olct l1 where l1.code = t0.location) as 'Location',avg(T0.[Price]) as 'Price'
FROM OINM T0
inner join oitm o1 on o1.itemcode = t0.itemcode
inner join oitb o2 on o2.itmsgrpcod = o1.itmsgrpcod
WHERE (T0.[DocDate] >= '[%1]' and T0.[DocDate] <= '[%2]') and
(o2.itmsgrpnam >= '[%3]' and o2.itmsgrpnam <= '[%4]' )
group by T0.[ItemCode],t0.warehouse,t0.location)a
Regards,
Vamsi.
Hi
try with below query
select b.code, b.name, b.Wh, b.Bal, b.Val,
isnull(case when b.days <30 then b.bal end,0)'0-30 Days' ,
isnull(case when b.days between 30 and 60 then b.bal end,0) '30-60 Days',
isnull(case when b.days between 60 and 90 then b.bal end,0) '60-90 Days',
isnull(case when b.days between 90 and 120 then b.bal end,0) '90-120 Days',
isnull(case when b.days between 120 and 150 then b.bal end,0) '120-150 Days',
isnull(case when b.days between 150 and 180 then b.bal end,0) '150-180 Days',
isnull(case when b.days >180 then b.bal end,0) 'Above 180 Days'
from (
select a.code,a.name,a.wh,a.bal,a.val,datediff(dd,dt,getdate())'days'
from (
select max(t0.itemcode)'Code',max(t0.Dscription)'Name',
max(t0.Warehouse)'Wh',
sum(t0.inqty-t0.outqty)'Bal',sum(t0.transvalue)'Val',max(t0.docdate)'dt'
from oinm t0 inner join oitm t1 on t0.itemcode=t1.itemcode
where t0.Warehouse=[%0]
group by t0.itemcode
)a
)b order by b.Val desc
Thanks
Kevin
Similar Messages
-
Filtering data in historic report instances
My goal is to filter data in a managed report instance without refreshing it. But I am having issues even viewing an instance. I am using Crystal Reports 2008 Server and the RAS API. Code below displays reports fine (i.e. SI_INSTANCE=0) but not report instances (i.e. SI_INSTANCE=1).
Approach 1, Use reportSource from PSReportFactory:
//Here is my query:
String reportQuery = "SELECT * FROM CI_INFOOBJECTS " + "WHERE SI_NAME = '" + report.getName() +
"' AND SI_KIND = '" + CeKind.CRYSTAL_REPORT + "' AND SI_INSTANCE = 1";
// Here I grab the latest report instance
IInfoObjects reports = iStore.query(reportQuery);
IInfoObject oInfoObject = (IInfoObject) reports.get(0);
IReportSourceFactory factoryPS = (IReportSourceFactory)es.getService("PSReportFactory");
Object reportSource = factoryPS.openReportSource((oInfoObject), getLocale());
// Here I prep and attempt to display
viewer.setReportSource( reportSource );
viewer.setDatabaseLogonInfos( newDBConnectionInfos() );
viewer.setEnableLogonPrompt( false );
viewer.setBestFitPage(true);
viewer.setOwnPage(false);
viewer.processHttpRequest();
processHttpRequest above throws:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Invalid job number.---- Error code:-2147215357 Error code name:internal
Approach 2, use ReportClientDocument from RASReportFactory...
// Same query as above:
String reportQuery = "SELECT * FROM CI_INFOOBJECTS " + "WHERE SI_NAME = '" + report.getName() +
"' AND SI_KIND = '" + CeKind.CRYSTAL_REPORT + "' AND SI_INSTANCE = 1";
// Here I grab the latest report instance
IInfoObjects reports = iStore.query(reportQuery);
IInfoObject oInfoObject = (IInfoObject) reports.get(0);
IReportAppFactory raf = (IReportAppFactory)es.getService("RASReportFactory");
ReportClientDocument rcd = raf.openDocument(oInfoObject, OpenReportOptions._openAsReadOnly, getLocale());
// Here I prep and attempt to display
viewer.setReportSource(rcd.getReportSource());
This approach throws an exception from
raf.openDocument()
with error:
Cannot open report document. --- Item SI_NEWOBJECT was not found in the collection.
Of these approaches I prefer the second as I can potentially filter the data.
Any ideas or help greatly appreciated as I am new to crystal reports.
Edited by: jhall3483 on May 14, 2010 11:24 PM
Edited by: jhall3483 on May 14, 2010 11:27 PMGood call Ted, and thanks for the reply! I had a bunch of Failed instances and it was choking on a failed one.
Now that I have identified a successful instance, I'm having trouble displaying the historical report data.
When I attempt to display using the PSReportFactory, from first approach above, it displays the report but I
don't get historic data, i.e. it is refreshing from the database. Of course historic data display works in the
CMC so I'm sure it must be possible. How can I get the viewer to show the data as it was when the report
was run?
Also, using the preferred RASReportFactory, from second approach, I get the following exception:
ReportSDKServerException: Failed to retrieve initial report values. For example, the database information for this report could be incomplete or
incorrect. This is a configuration problem. Please contact your system administrator.---- Error code:-2147467259 Error code name:failed
This seems odd as I am passing the database logon infos to the viewer, and it works the other way:
viewer.setDatabaseLogonInfos( newDBConnectionInfos() );
viewer.setEnableLogonPrompt( false );
Any ideas about how I can get it to work this way?
Thanks,
--Jeff.
Edited by: jhall3483 on May 16, 2010 9:25 PM
Edited by: jhall3483 on May 16, 2010 9:26 PM -
Link to summary report with filtered data set within FormsCentral
Is it possible to generate a link to a summary report with a filtered data set within FormsCentral?
If I have 4 sales agents each using the form to submit their repsective sales (with a dropdown indicating the sales agent) is it possible to filter the data so that only Sales Agent A see a report of their sales?
Thanks,
DTry following forum:
http://forums.adobe.com/community/formscentral?view=discussions -
Unable to see data in the report or workbook
Hello All,
We are struggling to display data in the report level or workbook, however the data is available in Multiprovider.
Error Message: "No Applicable Data Found"
Steps Carried Out:
1. Dropped the BIA Indexes for relevant cubes and Reactivated the Multiprovider, still did not work.
2. When we checked for previous years like 2013, we are able to see data in the report. To elaborate an issue, we loaded budget data for year 2015 as requested by user. Restricted the same filters from the Query in the Multiprovider and able to see the data in the backend, however not data can be seen in the Report.
3. Three Hierarchies are restricted in the Filters of the Query.
It would be great, if any of you can help us to fix the issue.
Best Regards,
SudhakarHi,
Have you used any exists?
in exists is there any system date kind?
Can you try to run your report thru RSRT and use debug option there.
before reporting please check your all connected targets have data for reporting.
mean at targets-->request tab, reporting symbol was there or not.
Any master data objects included in multi provider?
if yes then please check those, if any ACR was running then it may cause you.
if possible try to develop simple query with as per needs(mean to see 2015 data only).
As my guess selections/filters migth be hidden, please check those.
Thanks -
Particular data in a report, on the basis of the values (0, 1) of a dashboa
hi
User should be able to see the particular data in a report, on the basis of the values (0, 1) of a dashboard prompt.
For e.g. if the user selects 0 then current years data should be filtered out
and if the user selects 1 then rest all years data should be displayed in a request.
give me hint regarding this questionHi,
I hope this will help you
http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-selecting-reports-from-dashboard-prompts-and-guided-navigation-sections/
In this example he used prompt for selecting Region sales and Brand sales which you can replace with 0 and 1
Phani. -
No data in the Report, wich is based on a mp,
but data is exist in the cube and this cube has selected in that multi provider.
Hi,
This can happen due to multiple reasons.
1. Check the filters for your report.
2. Check the key figures which are there in the report, have non zero values for the ranges you are executing the report.
3. Check your UserID has proper auth to see the data for this report.
4. Check for the connection of SAP GUI with database.
5. Check can you see the data in MP? Have you made proper assignements to the selected objects in MP?
Hope it helps.
VA -
'select expert' option is not filtering data in CR, in VS2012
,Hi,
We have a VB VS2005 crystal report application , is working good with ' select expert ' option for filtering data in side crystal report. When we are migrated the application to VS2012, the application is not filtering the data inside crystal report. I could see the 'select expert ' options and Formula editor code in VB 2012 exactly same as VB 2005. But, there is no data filtering in Crystal Report. Please help. We are using Crystal report developer version for VS2012. My formula editor code inside CR 'select expert' is {REPORT.CODE} in ["3102", "4010"]Hi George
Please see if KBA 1204895 - Selection formula is ignored when using Crystal Reports 2008 and VS .NET 2005 helps to resolve the issue.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on
Twitter -
Hi,
I have a dashboard with two sections. Each section is pointed to a separate report (one is regarding actuals from Oracle eBiz) and another sections for report from planning application (Budget values). I am using same RPD for both the reports.
Now I have a scenario in which I need to pass a value to both the sections so that both the reports filder data based on the same value.?
Can I create a prompt which will pass value to both the sections (i.e to both the reports) so that reports display data for the same filter condition (lets say actual data in report 1 for 2012) and budget data in second report for the same year? How to do this? Can it me done using presentation variable so that value from the variable is passed to both the sections?
Is there better way to display actual vs budget data in one place ,lets say in the same section?
Thanks and Regards
SantoshYou can use a presentation variable in your Dashboard prompt and pass this to the relevant field filters in both reports, or if you are earlier in your project, the correct way I would go about this would be to use a common presentation_table.column name syntax (like Time.Year) in both subject areas , then you can simply build the dashboard prompt using one of the subject area and the values will still be passed to the 2nd report / subject area so long as you have 'is prompted' where appropriate.
The second approach only works if you have a common syntax across both subject areas, for something like the time dimension I dont see a reason why there shouldnt be anyway - Note Aliases in the Presentation Layer dont count! -
HI All,
I have an query, i have data like how to get filtered data
i have data like below
we have started this report with below data for Oct 2014 to Dec 2014
QUARTER
STATE
COUNT
Oct 2014 - Dec 2014
U.P
70
Oct 2014 - Dec 2014
M.P
0
Oct 2014 - Dec 2014
BIHAR
3
Oct 2014 - Dec 2014
MAHA
50
Oct 2014 - Dec 2014
RAJ
3
so it was very easy to generate report
then we get data for Jan 2014 to March 2014
QUARTER
STATE
COUNT
Oct 2014 - Dec 2014
U.P
70
Oct 2014 - Dec 2014
M.P
0
Oct 2014 - Dec 2014
BIHAR
3
Oct 2014 - Dec 2014
MAHA
50
Oct 2014 - Dec 2014
RAJ
3
Jan 2014 - Mar 2014
U.P
77
Jan 2014 - Mar 2014
M.P
1
Jan 2014 - Mar 2014
BIHAR
4
Jan 2014 - Mar 2014
MAHA
77
Jan 2014 - Mar 2014
RAJ
5
so we applied filter on quarter manually for generating the report
now we have data like below
QUARTER
STATE
COUNT
Oct 2014 - Dec 2014
U.P
70
Oct 2014 - Dec 2014
M.P
0
Oct 2014 - Dec 2014
BIHAR
3
Oct 2014 - Dec 2014
MAHA
50
Oct 2014 - Dec 2014
RAJ
3
Jan 2014 - Mar 2014
U.P
77
Jan 2014 - Mar 2014
M.P
1
Jan 2014 - Mar 2014
BIHAR
4
Jan 2014 - Mar 2014
MAHA
77
Jan 2014 - Mar 2014
RAJ
5
Apr 2014 - Jun 2014
U.P
186
Apr 2014 - Jun 2014
M.P
18
Apr 2014 - Jun 2014
BIHAR
74
Apr 2014 - Jun 2014
MAHA
189
Apr 2014 - Jun 2014
RAJ
68
now as per new requirement they want only this quarter data of Apr 2014 to Jun 2014
Apr 2014 - Jun 2014
U.P
186
Apr 2014 - Jun 2014
M.P
18
Apr 2014 - Jun 2014
BIHAR
74
Apr 2014 - Jun 2014
MAHA
189
Apr 2014 - Jun 2014
RAJ
68
and requirement like we have to automate this process . means report should contain only current quarter value.
so my query is how to achieve this
please suggest
I am using SAP BO 3.1
Thanks in advance
JeetHi Jeet,
You can try this-
Create variable
V_Quarter= if Left(<QUARTER>,3)="Jan" then 1 elseif Left(<QUARTER>,3)="Apr" then 2 elseif Left(<QUARTER>,3)="Jul" then 3 else 4
V_Year= Right(<QUARTER>)
V_CurrQuarter=Quarter(CurrentDate())
V_CurrYear=Year (CurrentDate())
Apply filter on report
V_Quarter= V_CurrQuarter and V_Year=V_CurrYear
-Anuj -
Previous month data in WebI Report
Hi All,
I have a universe created on a Bex Query. I don't have any variables created in the Bex Query. I have to create a WebI report with Calendar Year/Month as selection and depending on what user enters, i have to display Cost for the month entered by the user and cost for (month -1 ). For eg. if the user enters Feb 2009, then the report should display Cost for Jan 2009 and Feb 2009. I have created a filter for Calendar Year/Month. How do i bring previous month data in the report ? I don't have to modify the Bex Query. I have to achieve it on the BO side. Can you guys help on this problem.
Thanks,
SaachiHi,
There is a restriction in BO when you use it with SAP.
When the user filters the data for FEB 2009, you will not be able to get data for JAN 2009 as it does
not go again to the Bex query to fetch this data.
The only workaround as of now to this is to bring all the data using Bex query by having a filter
at the BO Query level where you say Cal year/month key = (From prompt) or
Cal year/month key <> #.
This is because it considers Cal year/month as string and so even at the universe level we will not
be able to create a previous month formula.
I hope this helps.
Thanks,
Kartik -
To retrieve the oldest date in the report
I have a requirement to retrive the oldest date in the report, I am currently working in BW 3.5
The scenario is as below
I have a char infoObject creation date which retrieves the date
I have a char infoobject status which retrieves open or close
For eg in my cube I have 5 records
3 records has the status open and 2 records has the status closed
When I adding the InfoObject "creation date" which has filtered for the open status , I am getting the result correctly with 3 records
Now my requirement is I need to have only one row which should get oldest "creation date" out of the 3 records as below
Rec1 10.10.2006
Rec2 25.11.2007
Rec3 20.08.2009
I need only one count in the creation date which should show me 10.10.2006Hi Pavan.
Can you model the creation date as a key figure as well as having it as a char? If so, you can create a condition on the key figure, to only give you the "Bottom 1" record.
I think in 3.5 you cannot use a formula variable to read the value of the char in the row, but if you can, you can do it like that with a calculated key figure where you use the formula var and then put a condition on this ckf.
regards
Jacob -
Pagination error when filtering in an Interactive Report
Hi All,
I'm getting a pagination error, when filtering from the column header in an Interactive Report.
Report error:
Invalid set of rows requested, the source data of the report has been modified.*
Reset Pagination*
The steps to recreate:
1. Run an Interactive Report
2. Click the next button to go to the second page of data.
3. From the column header select a data element that will return less than 15 rows. Note -- if the there are 15 or more rows of data, the error will not occur.
The Report will fail with the error shown above.
It looks like the pagination needs to be reset after the column filter, but how is this done?
I'm using the canned interactive report with no customizations. Is there a fix for this issue?
ThanksThis «bug» is known for a long time unfortunately...
I never find any solution for IR report filtering.
Maybe you can use some JQuery to change the link when clicking a value in the list, (add a code that will update pagination).
Something like :
$('#apexir_rollover_content').load(function() {
$(this).find('a').click(function(){
gReport.search('SEARCH');
});But I don't think it will work, as they already use JQuery to bind that <a> events.
In case you update your report using a button, you can simply use a "reset pagination" process called on button click.
In case you use column link you simply have to tick the «Reset Pagination» checkbox.
I hope Apex team will fix that one day.
Good luck.
Yann. -
Passing filters to multiple Analyzer reports
I've used the drill link to pass filters to another (single) report, no problem. Has anyone figured a way to pass filter to multiple reports?
We bring users into a high level screen where they select their location with access being controlled by filters. Once there they have the option of selecting several reports using service buttons and would like the location passed instead of having to select again.
Using Analyzer 7.2 and will be upgrading to System 9 this year.Hi,
Yes, this is very much possible. Here's what you need to do:
If the parameter is a string, number or date created in the Main Report then you can right-click the 1st subreport and select 'Change Subreport Links' > In the Fields to link to area move the Main Report parameter from the Available Fields area on the left.
If the Subreport also has parameters then you can select the right-one that needs to be linked from the drop-down. This is directly link the Main report parameter to the Subreport parameter and you would prompted only once.
Hope this helps!
-Abhilash -
Can not refresh data int the report...
Application on C#.
Steps:
1. Get Report without data from the database
2. Change the dataconnections in report to the current user
3. refresh data on the report (FilePath = TempFilePath)
4. Resave report file with data
5. Automatically open CrystalReportsViewer2008 and load the report
Result
On developer machine is allright, but on the user machine data isn't refreshed. Therefore CrysrtalReportsViewer2008 can't open report. It say that check the SaveDatawithReport parameter.
In process I found that in temp directory on user pc, didn't creates some temprorary files which creates on developer PC. Why? Help me please.
Sorry for my English.There is the code of my programm
function ParseReport is refreshed the data and change dataconnections for current user
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using CRApp;
using Microsoft.Win32;
namespace CRApp
* u041Au043Bu0430u0441u0441 u0434u043Bu044F u0430u0432u0442u043Eu043Cu0430u0442u0438u0437u0438u0440u043Eu0432u0430u043Du043Du043Eu0433u043E u0432u0438u0437u0443u0430u043Bu044Cu043Du043Eu0433u043E u0434u043Eu0441u0442u0443u043Fu0430
* u043A u0444u0430u0439u043Bu0430u043C u0448u0430u0431u043Bu043Eu043Du043Eu0432, u0441u0433u0435u043Du0435u0440u0438u0440u043Eu0432u0430u043Du043Du044Bu0445 u0432
* u043Fu0440u043Eu0433u0440u0430u043Cu043Cu0435 Crystal Reports
public partial class Export2CR_MForm : Form
public Export2CR_MForm()
InitializeComponent();
Start();
public void Start()
LoginForm Login = new LoginForm();
DialogResult Dres = Login.ShowDialog();
if (Dres == DialogResult.OK)
if (Login.GetConStr().ToString() != "")
GetReportNamesFromDataBase(Login.GetConStr());
SetConnectionString(Login.GetConStr());
this.CenterToScreen();
Visible = true;
Login.Close();
else
Login.Close();
this.CenterToScreen();
this.OnClosed(null);
* u041Fu043Eu043Bu0443u0447u0430u0435u043C u043Fu0443u0442u044C u043A u0432u0440u0435u043Cu0435u043Du043Du044Bu043C u0444u0430u0439u043Bu0430u043C
TempFilePath = Path.GetTempPath();
* u041Au0440u0438u0441u0442u0430u043Bu043Eu0432u0441u043Au0438u0439 u0432u044Cu044Eu0432u0435u0440u043Eu043A
CrystalDecisions.Windows.Forms.CrystalReportViewer viewer;
* u041Fu0443u0442u044C u043A u0432u0440u0435u043Cu0435u043Du043Du043Eu0439 u043Fu0430u043Fu043Au0435
private string TempFilePath;
* u041Fu0430u0440u0430u043Cu0435u0442u0440 u0437u0430u043Fu0438u0441u0438 u0432 u0440u0435u0436u0438u043Cu0435, u0442u0430u0431u043Bu0438u0446u0435 (u0438u0442u0434...)
* u041Du0443u0436u0435u043D u0434u043Bu044F u0442u043Eu0433u043E u0447u0442u043Eu0431u044B u0432u044Bu0431u0438u0440u0430u0442u044C
* u043Eu043Fu0435u0440u0435u0434u043Bu0451u043Du043Du044Bu0439 u0434u0430u0442u0430u0441u0435u0442, u0441u043Eu043Eu0442u0432u0435u0442u0441u0442u0432u0443u044Eu0449u0438u0439 u0432u044Bu0431u0440u0430u043Du043Du043Eu0439 u0437u0430u043Fu0438u0441u0438
private int ObjectIDOfTemplate;
* u0423u0441u0442u0430u043Du043Eu0432u043Au0430 u0437u043Du0430u0447u0435u043Du0438u044F ObjectIDOfTemplate
public void SetObjectIDOfTemplate(int /*
* ObjectID u0442u043Eu0433u043E u0448u0430u0431u043Bu043Eu043Du0430,
* u043Au043Eu0442u043Eu0440u044Bu0439 u043Du0430u0434u043E u043Fu043Eu043Bu0443u0447u0438u0442u044C
EnternalObjectID)
ObjectIDOfTemplate = EnternalObjectID;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C ObjectID u0448u0430u0431u043Bu043Eu043Du0430
* u0441 u043Au043Eu0442u043Eu0440u044Bu043C u0440u0430u0431u043Eu0442u0430u043Bu0438 u0434u043Bu044F
* u0438u0441u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u043Du0438u044F u0435u0433u043E u0432u043Du0435 u0431u0438u0431u043Bu0438u043Eu0442u0435u043Au0438
public int GetObjectIDOfTemplate()
return ObjectIDOfTemplate;
* u041Fu0443u0442u044C u043A u0432u044Bu043Fu043Bu044Eu043Du0443u0442u043Eu043Cu0443 u0444u0430u0439u043Bu0443
private string TemplateFilePath;
* u0423u0441u0442u0430u043Du043Eu0432u0438u0442u044C u043Fu0443u0442u044C u043A
* u0432u044Bu043Fu043Bu044Eu043Du0443u0442u043Eu043Cu0443 u0444u0430u0439u043Bu0443
public void SetTemplateFilePath(string In)
TemplateFilePath = In;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u043Fu0443u0442u044C u043A
* u0432u044Bu043Fu043Bu044Eu043Du0443u0442u043Eu043Cu0443 u0444u0430u0439u043Bu0443
public string GetTemplateFilePath()
return TemplateFilePath;
* u0424u0443u043Du043Au0446u0438u044F u043Eu0442u043Au0440u044Bu0442u0438u044F u0444u0430u0439u043Bu0430,
* u043Fu043Eu043Bu0443u0447u0435u043Du043Du043Eu0433u043E u0438u0437 u0431u0430u0437u044B u0438
* u043Fu043Eu043Bu043Eu0436u0435u043Du043Du043Eu0433u043E u0432u043E u0432u0440u0435u043Cu0435u043Du043Du0443u044E u043Fu0430u043Fu043Au0443
public int ParseReport(string FilePath)
viewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
CrystalDecisions.CrystalReports.Engine.ReportDocument rd =
new CrystalDecisions.CrystalReports.Engine.ReportDocument();
try
rd.Load(FilePath);
try
for (int i = 0; i < rd.DataSourceConnections.Count; i++)
rd.DataSourceConnections<i>.SetConnection(
GetConnectionString().GetServerName(),
GetConnectionString().GetDatabaseName(),
GetConnectionString().GetUserName(),
GetConnectionString().GetPassword()
for (int j = 0; j < rd.Database.Tables.Count; j++)
DataTable dataSet = new DataTable();
SqlConnection C = new SqlConnection(GetConnectionString().ToString());
string ViewName = GetDataViewName(GetConnectionString(), ParseTableName(
rd.Database.Tables[j].Name));
SqlCommand Q = new SqlCommand("select * from " + ViewName
, C);
Q.CommandType = CommandType.Text;
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = Q;
adapter.Fill(dataSet);
rd.Database.Tables[j].SetDataSource(dataSet);
catch (Exception e)
MessageBox.Show(e.Message);
try
SetTemplateFilePath(TempFilePath + "\\" + FileTreeView.SelectedNode.Text.ToString() + ".rpt");
rd.ReportOptions.EnableSaveDataWithReport = true;
viewer.ReportSource = rd;
viewer.RefreshReport();
rd.SaveAs(TemplateFilePath);
rd.Close();
return 0;
catch (Exception e)
MessageBox.Show(e.Message);
return -1;
catch (Exception ex)
rd.ReportOptions.EnableUseDummyData = true;
rd.ReportOptions.EnableSaveDataWithReport = true;
viewer.RefreshReport();
rd.SaveAs(TemplateFilePath);
MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
return -1;
* u0420u0430u0437u0431u0438u0435u043Du0438u0435 u0438u043Cu0435u043Du0438 u0442u0430u0431u043Bu0438u0446u044B
* u0434u043Bu044F u043Fu043Eu043Bu0443u0447u0435u043Du0438u044F u043Du043Eu043Cu0435u0440u0430 u043Au043Bu0430u0441u0441u0430
public string ParseTableName(string TableName)
// MessageBox.Show(TableName);
int x = 0;
if (TableName.Contains("Class"))
x = TableName.LastIndexOf("s");
return TableName.Remove(0,x+1);
if(TableName.Contains("Attr"))
x = TableName.IndexOf("r");
// MessageBox.Show(x.ToString());
// MessageBox.Show(TableName.Remove(0, x+1));
return TableName.Remove(0, x+1);
* u0424u0443u043Du043Au0446u0438u044F u043Fu043Eu043Bu0443u0447u0435u043Du0438u044F u0444u0430u0439u043Bu0430 u0438u0437 u0431u0430u0437u044B
public int ParseReportWithDataBase()
try
string ConnectionString = GetConnectionString().ToString();
SqlConnection C = new SqlConnection(ConnectionString);
C.Open();
string SelectString = "select P119 from "+ GetDataViewName(GetConnectionString(),"24") +" where P115='";
SelectString = SelectString+FileTreeView.SelectedNode.Text.ToString()+"'";
SqlCommand Q = new SqlCommand(SelectString, C);
Q.CommandType = CommandType.Text;
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = Q;
DataTable table = new DataTable();
adapter.Fill(table);
byte[] b = (byte[])table.Rows[0].ItemArray.GetValue(0);
FileStream fs = File.Create(TempFilePath+"\\"+FileTreeView.SelectedNode.Text.ToString()+".rpt");
fs.Write(b, 0, b.Length);
fs.Close();
C.Close();
return 0;
catch (Exception ex)
MessageBox.Show(ex.Message);
return -1;
* u0421u0442u0440u0443u043Au0442u0443u0440u0430, u043Eu043Fu0438u0441u044Bu0432u0430u044Eu0449u0430u044F u043Fu0430u0440u0430u043Cu0435u0442u0440u044B
* u043Fu043Eu0434u043Au043Bu044Eu0447u0435u043Du0438u044F u043A u0431u0430u0437u0435 u0434u0430u043Du043Du044Bu0445,
* u043Au0430u043A u0434u043Bu044F u0432u043Du0435u0448u043Du0435u0433u043E u0438u0441u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u043Du0438u044F
* u0442u0430u043A u0438 u0434u043Bu044F u0432u043Du0443u0442u0440u0435u043Du043Du0435u0433u043E
public struct ConnectionString
* u0418u043Cu044F u0441u0435u0440u0432u0435u0440u0430 u0431u0430u0437u044B u0434u0430u043Du043Du044Bu0445
private string DataSource_Value;
* u041Du0430u0437u0432u0430u043Du0438u0435 u0431u0430u0437u044B u0434u0430u043Du043Du044Bu0445
private string InitialCatalog_Value;
* u0418u043Cu044F u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u0442u0435u043Bu044F
private string UserID_Value;
* u041Fu0430u0440u043Eu043Bu044C
private string Password_Value;
* u041Fu0435u0440u0435u0433u0440u0443u0436u0435u043Du043Du044Bu0439 u043Au043Eu043Du0441u0442u0440u0443u043Au0442u043Eu0440
* u0434u043Bu044F u0440u0443u0447u043Du043Eu0439 u0438u043Du0438u0446u0438u0430u043Bu0438u0437u0430u0446u0438u0438
* u0441u0442u0440u043Eu043Au0438 u043Fu043Eu0434u043Au043Bu044Eu0447u0435u043Du0438u044F,
* u043Du0443u0436u0435u043D u0434u043Bu044F u0438u0441u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u043Du0438u044F u0435u0433u043E
* u0432 u043Eu0434u0440u0443u0433u0438u0445 u0444u043Eu0440u043Cu0430u0445
public ConnectionString(string /*
* u0418u043Cu044F u0441u0435u0440u0432u0435u0440u0430 u0431u0430u0437u044B u0434u0430u043Du043Du044Bu0445
InDataSource_Value,
string /*
* u041Du0430u0437u0432u0430u043Du0438u0435 u0431u0430u0437u044B u0434u0430u043Du043Du044Bu0445
InInitialCatalog_Value,
string /*
* u0418u043Cu044F u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u0442u0435u043Bu044F
*/ InUserID_Value,
string /*
* u041Fu0430u0440u043Eu043Bu044C
*/ InPassword_Value)
DataSource_Value = InDataSource_Value;
InitialCatalog_Value = InInitialCatalog_Value;
UserID_Value = InUserID_Value;
Password_Value = InPassword_Value;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u0438u043Cu044F u0441u0435u0440u0432u0435u0440u0430
* u0431u0430u0437u044B u0434u0430u043Du043Du044Bu0445
public string GetServerName()
return DataSource_Value;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u043Du0430u0437u0432u0430u043Du0438u0435
* u0431u0430u0437u044B u0434u0430u043Du043Du044Bu0445
public string GetDatabaseName()
return InitialCatalog_Value;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u0438u043Cu044F
* u0442u0435u043Au0443u0449u0435u0433u043E u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u0442u0435u043Bu044F
public string GetUserName()
return UserID_Value;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u043Fu0430u0440u043Eu043Bu044C
* u0442u0435u043Au0443u0449u0435u0433u043E u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u0442u0435u043Bu044F
public string GetPassword()
return Password_Value;
* u041Fu0435u0440u0435u0432u043Eu0434 u0441u0442u0440u0443u043Au0442u0443u0440u044B u0432 u0442u0435u043Au0441u0442u043Eu0432u044Bu0439 u0432u0438u0434
* u0434u043Bu044F u0438u0441u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u043Du0438u044F u043Fu0440u0438 u0441u043Eu0437u0434u0430u043Du0438u0438 u043Au043Eu043Du043Du0435u043Au0442u043Eu0440u0430
public override string ToString()
return "Data Source="+DataSource_Value+";Initial Catalog="+
InitialCatalog_Value+";User ID="+UserID_Value+";Password="+
Password_Value;
* u0424u0443u043Du043Au0446u0438u044F u043Fu043Eu043Bu0443u0447u0435u043Du0438u044F u0441u0442u0440u043Eu043Au0438 u043Fu043Eu0434u043Au043Bu044Eu0447u0435u043Du0438u044F u043Fu043E u0443u043Cu043Eu043Bu0447u0430u043Du0438u044E
* u043Du0443u0436u043Du0430 u0431u044Bu043Bu0430 u0434u043Bu044F u0442u0435u0441u0442u043Eu0432
static private string GetDefaultConnectionString()
return "Data Source=BSRV01;Initial Catalog=Prokat_Last;User ID=sa;Password=";
* u0412u043Du0443u0442u0440u0435u043Du043Du044Fu044F u0441u0442u0440u043Eu043Au0430 u043Fu043Eu0434u043Au043Bu044Eu0447u0435u043Du0438u044F
* u043Du0435 u0434u043Eu0441u0442u0443u043Fu043Du0430 u0434u043Bu044F u0432u044Bu0437u043Eu0432u0430 u043Du0430u043Fu0440u044Fu043Cu0443u044E
private ConnectionString localConnectionString;
* u0423u0441u0442u0430u043Du043Eu0432u0438u0442u044C u0441u0442u0440u043Eu043Au0443 u0432u043Du0443u0442u0440u0435u043Du043Du0435u0433u043E u043Fu043Eu0434u043Au043Bu044Eu0447u0435u043Du0438u044F
public void SetConnectionString(ConnectionString CS)
this.localConnectionString = CS;
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u0441u0442u0440u043Eu043Au0443 u0432u043Du0443u0442u0440u0435u043Du043Du0435u0433u043E u043Fu043Eu0434u043Au043Bu044Eu0447u0435u043Du0438u044F
public ConnectionString GetConnectionString()
return this.localConnectionString;
* u0424u0443u043Du043Au0446u0438u044F u0443u0434u0430u043Bu0435u043Du0438u044F u0432u0440u0435u043Cu0435u043Du043Du043Eu0433u043E u0444u0430u0439u043Bu0430
* u043Fu043Eu0441u043Bu0435 u0437u0430u0432u0435u0440u0448u0435u043Du0438u044F u0432u0441u0435u0445 u043Eu043Fu0435u0440u0430u0446u0438u0439 u0441 u0448u0430u0431u043Bu043Eu043Du043Eu043C
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
if (FileTreeView.Nodes.Count!=0)
if (File.Exists(TemplateFilePath))
File.Delete(TemplateFilePath);
* u041Eu0431u0440u0430u0431u043Eu0442u0447u0438u043A u0434u0432u043Eu0439u043Du043Eu0433u043E u043Au043Bu0438u043Au0430
* u043Fu043E u0448u0430u0431u043Bu043Eu043Du0443 u0432 u0434u0435u0440u0435u0432u0435 u0444u0430u0439u043Bu043Eu0432
public void FileTreeView_DoubleClick(object sender, EventArgs e)
int Result = 0;
try
Result = ParseReportWithDataBase();
if (Result == 0)
Result = ParseReport(TempFilePath + FileTreeView.SelectedNode.Text.ToString() + ".rpt");
if (Result == 0)
Process.Start(TemplateFilePath);
else
MessageBox.Show("u0424u0430u0439u043B u043Du0435 u043Cu043Eu0436u0435u0442 u0431u044Bu0442u044C u043Eu0442u043Au0440u044Bu0442!");
catch (Exception ex)
MessageBox.Show(ex.Message);
* u041Fu043Eu043Bu0443u0447u0435u043Du0438u0435 u0432u0441u0435u0445 u0444u0430u0439u043Bu043Eu0432 u0441 u0440u0430u0441u0448u0438u0440u0435u043Du0438u0435u043C .rpt
* u0438u0437 u0431u0430u0437u044B u043A u043Au043Eu0442u043Eu0440u043Eu0439 u043Fu0440u0438u0441u043Eu0435u0434u0438u043Du0438u043Bu0438u0441u044C
public void GetReportNamesFromDataBase(ConnectionString CS)
try
SqlConnection C = new SqlConnection(CS.ToString());
SqlDataAdapter adapter = new SqlDataAdapter();
DataTable table = new DataTable();
table.Clear();
string sqlcom = "Select P115 from " + GetDataViewName(CS,"24") + " where P116 like '%.rpt'";
SqlCommand Q1 = new SqlCommand(sqlcom,C);
Q1.CommandType = CommandType.Text;
adapter.SelectCommand = Q1;
adapter.Fill(table);
FileTreeView.Nodes.Clear();
for (int i = 0; i < table.Rows.Count; i++)
FileTreeView.Nodes.Add(table.Rows<i>.ItemArray.GetValue(
table.Rows<i>.ItemArray.Length-1).ToString());
// MessageBox.Show(table.Rows<i>.ItemArray.GetValue(0).ToString());
C.Close();
catch (Exception ex)
MessageBox.Show(ex.Message);
* u041Fu043Eu043Bu0443u0447u0438u0442u044C u0438u043Cu044F DataView
* u0434u043Bu044F u0442u0435u043Au0443u0449u0435u0433u043E u043Fu043Eu043Bu044Cu0437u043Eu0432u0430u0442u0435u043Bu044F
private string GetDataViewName(ConnectionString CS,string ClassID)
string ViewName = "";
SqlConnection C = new SqlConnection(CS.ToString());
C.Open();
SqlCommand Q = new SqlCommand("[dbo].[_SysGetClassesInfoNew1]"/*P115 from dbo.Attr24 where P116='.rpt'*/, C);
Q.CommandType = CommandType.Text;
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = Q;
DataTable table = new DataTable();
adapter.Fill(table);
for (int i = 0; i < table.Rows.Count; i++)
if (table.Rows<i>.ItemArray.GetValue(0).ToString() == ClassID)
ViewName = table.Rows<i>.ItemArray.GetValue(13).ToString();
// MessageBox.Show(ViewName);
C.Close();
return ViewName;
* u041Eu0431u0440u0430u0431u043Eu0442u0447u0438u043A u043Au043Bu0438u043Au0430 u043Du0430 u0432u044Bu043Fu0430u0434u0430u044Eu0449u0435u043C
* u043Cu0435u043Du044E u0432 u043Fu0443u043Du043Au0442u0435 "Delete"
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
FileTreeView.SelectedNode.Remove(); -
Could not see the data in the report
Hi,
BOXI R3.1 is intalled newly in my sytem.Through Infoview,when i refresh a new report, though data is getting into the report ,I am not able to see the data in the report plus the Header color is blue and the rest of the row colors are displaying as yellow.
when I am logging in another machine i am able to see the data.Please help me in solving this issue.
Thanks in Advance.
Regards,
Spandana.Spandana,
As suggested, JVM is problem. You can find out it at Control Panel == Java (Double-click) General tab == About button (See the build version) (build 1.6.0_20-b02). So you have to choose below 20 (I prefer 17).
Alternatively, You might have several Java's running on your machine. Uninstall all Java versions and start developing reports or Editing any existing reports, now BO will prompt for you to install JVM, Run it, Now the problem is solved.
Hope it should solves the issue.
If you want to see the data:(now with yellow & blue)
Select Column == properties == Read cell content as, change it to HTML.
Thank You!!
Sent from iPhone
Maybe you are looking for
-
How to disable audio output in while in sleep mode? (annoying issue)
I have a my workstation set up in my bedroom and when I am not using it I put it to sleep (or wait for it to go to sleep deu to inactivity). The problem is that when its asleep the audio output is still active. So when I get emails and such the spe
-
Basic start date and scheduled finished date...can we have Planned date?
Is there any "Plan Start Date" in SAP, the date where scheduler must put manually in the system to determine the "committed" date for the work to be executed - based on earliest and latest start date which automatically calculated by SAP? Our plant m
-
How do I get an ISO Image for Boot Camp?
I can't use bootcamp because i don't have a Windows 7 ISO Image. Where can i get a Windows 7 ISO Image?
-
Live in the San Francisco area and want to participate in an Adobe usability study?
Adobe is conducting usability studies in San Francisco from 6/23 to 25. If you are interested, please respond to https://www.surveymonkey.com/s/WKC8736
-
Mac mini specific osx 10.4 ? Will this version work on my machine?
I found a set of install disks for mac mini with the following specs on the CD: mac os version 10.4,AHT version 1.0,disc version 1.0,22691-5455-a Will this work on my 1.42 Ghz PPC G4 1GB DDR SDRAM Serial Number: YM5***RHS (not an Intel mac). Bought i