Refresh an alv_tree
Hi experts,
How can refresh an alv_tree?
i modify a value in the table such as:
DATA: yplm00_tree LIKE gt_output.
call method g_alv_tree_1001_a->get_outtab_line
exporting
i_node_key = p_node_key
importing
e_outtab_line = yplm00_tree.
CASE yplm00_tree-tipol.
WHEN 'PY'.
UPDATE YPLM01 CLIENT SPECIFIED SET STATS = p_fcode
WHERE PSPNR = yplm00_tree-pspnr
AND mandt = sy-mandt.
WHEN 'PR'.
WHEN 'RV'.
WHEN 'EN'.
WHEN 'RS'.
ENDCASE.
CALL METHOD g_alv_tree_1001_a->update_calculations.
CALL METHOD g_alv_tree_1001_a->frontend_update.
And after modified, i want refresh the alv_tree, i intent with
CALL METHOD g_alv_tree_1001_a->update_calculations.
CALL METHOD g_alv_tree_1001_a->frontend_update.
But don´t work... other ways?
Thanks in advance,
Regards,
Hello,
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
call method grid (name of grid )->refresh_table_display
exporting
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).
Neeraj
Similar Messages
-
ALV_TREE with item_double_click
Hi Experts
I have developed a report which has to display the balance sheet in the tree format. I have done the code for it, now I am have stuck -up with the double click on the item. I have coded like below;
class LCL_APPLICATION definition.
PUBLIC SECTION.
METHODS:
HANDLE_NODE_DOUBLE_CLICK
FOR EVENT NODE_DOUBLE_CLICK
OF cl_gui_alv_tree
IMPORTING NODE_KEY,
HANDLE_ITEM_DOUBLE_CLICK
FOR EVENT ITEM_DOUBLE_CLICK
OF cl_gui_alv_tree
IMPORTING NODE_KEY
FIELDNAME.
endclass.
class LCL_APPLICATION implementation.
METHOD HANDLE_NODE_DOUBLE_CLICK.
perform disp_node_details using node_key.
ENDMETHOD. "HANDLE_NODE_DOUBLE_CLICK
METHOD HANDLE_ITEM_DOUBLE_CLICK.
G_NODE_KEY = NODE_KEY.
w_field = FIELDNAME.
PERFORM disp_2nd_list USING G_NODE_KEY w_field.
ENDMETHOD. "HANDLE_ITEM_DOUBLE_CLICK
form register_events .
DATA: lt_events TYPE cntl_simple_events,
l_event TYPE cntl_simple_event,
l_event_receiver TYPE REF TO LCL_APPLICATION.
call method alv_tree->get_registered_events
importing events = lt_events.
LOOP AT lt_events INTO l_event.
l_event-appl_event = 'X'.
modify lt_events FROM l_event TRANSPORTING appl_event.
CLEAR l_event.
ENDLOOP.
* register events on frontend
CALL METHOD alv_tree->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc <> 0.
MESSAGE x208(00) WITH 'ERROR'. "#EC NOTEXT
ENDIF.
CREATE OBJECT l_event_receiver.
SET HANDLER l_event_receiver->HANDLE_NODE_DOUBLE_CLICK FOR alv_tree.
SET HANDLER l_event_receiver->HANDLE_ITEM_DOUBLE_CLICK FOR alv_tree.
endform. " register_events
In this way both events are not triggering and if I try below method, the hirarchey is not displaying in the output.
only the top nodes are displaying and the events are triggering. The second method in the form register_events is like below
l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
l_event-appl_event = 'X'.
append l_event to lt_events.
l_event-eventid=cl_gui_column_tree=>eventid_node_double_click
l_event-appl_event = 'X'
append l_event to it_events
Edited by: Praveen Kumar on Nov 17, 2009 8:22 AMhi
(also check u have refresh the field)
Check the demo program,In this double click the data fields it will display some field in screen,You can check it
BCALV_GRID_DND_TREE
Thanks
Edited by: dharma raj on Jun 17, 2009 7:41 PM -
Can not refresh view data in STRUST
I am using the JSP (STRUTS) for developing my App.
I get a list of contact. In bellow it, I make a link for each contacts.
When i view details of one contact. On click link below.
My pages:
listcontact.jsp
contactdetails.jsp
When i request a details of contact from list contact -> View successfull.
But when i refresh the contactdetails.jsp page. I got a message error:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs.
I have to use:
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
But can't refresh any way this page.
Plase show me the way to solve it.
Thanks
Vu Nguyenhi,
Here are codes
listdata = new CompanyListData();
companyList = (ArrayList) session.getAttribute("datalist_company");
if (companyList == null)
companyList = (ArrayList) listdata.getCompanyList(datasource);
session.setAttribute("total", companyList.size()+ " companies");
session.setAttribute("datalist_company", companyList);
return (mapping.findForward("success"));
And for details:
if ((addressItem==null && companyName!=null)||(addressItem==null&& companyId!="0"))
addressData = new AddressDetailData();
addressItem = addressData.getAddressItem(datasource, companyId);
session.setAttribute("addressDetail", addressItem);
I got companyID by:
String companyId = request.getParameter("companyId");
return (mapping.findForward("success"));
Please gest the problems that.
Thanks, -
Hi All ,
I am facing an issue where the EPM Excel Templates on SERVER ROOT FOLDER take time to open on 1 system . It also takes great amount of time to REFRESH . While on an another system the same Report opens rather quickly and refreshes also quickly .
Regards,
SHUBHAMHi Shubham,
Now day excel problems are due to some MS update. Not sure but have a look at below note.
2107965 - Issues in EPM Add-in after installing Microsoft updates -
Refreshing the Data from a embed view in a view container
Hi everybody
I would like to know how can I do to refresh all data from a View with a view container the problem is:
that I have a window that has a view at the same time this has a view container. The Main view brings the data of editable elements when I select one element of the main view the view container brings a list for that element (dependencies) but only the first time a choose an element loads the correct data, when I choose another one it brings the same old data and doesn't make the call for the wdDoInit() method.
The question is:
How do I force the view to refresh all the data or call again the wdDoInit() method?
Thank you for your helpAida,
Lets say you have two components C1 and C2 and you want method from C1 to be available in C2 then follow these steps:-
1) Goto the Interface Controller of C1 and create a method there lets say doSomething
2) Then goto C2. There you can see Used Web Dynpro Components --> Right click Add Used Component --> Give some name say C1Comp --> Click browse and select C1 --> Click Finish.
3) Next goto Component Controller of C2 --> Properties --> Click Add and check if C1 is added. If not then select the checkbox and select OK.
4) Now goto Implementation tab of C2 and lets say wdDoInit you can write following code:-
wdThis.wdGetC1CompInterface().doSomething();
Chintan -
Not able to refresh the data in a table
Hi In my application i fill data in a table on clikc of a button ..
Following are the line of code i have user
RichColumn richcol = (RichColumn)userTableData.getChildren().get(0); (fetch the first column of my table)
richcol.getChildren().add(reportedByLabel); (reportedByLabel is a object of RichInputText)
AdfFacesContext adfContext1 = AdfFacesContext.getCurrentInstance();
adfContext1.addPartialTarget(richcol);
adfContext1.addPartialTarget(userTableData);
But on submit of that button table data is not refreshed after adding partial trigger on that table as well as that column also .... any idea??
Edited by: Shubhangi m on Jan 27, 2011 3:50 AMHi,
The Code that you have shown adds an additional inputText component to the first column of a table.
Is that your intention?
If yes, please use the following code snippet to achieve your functionality:
JSPX Code:
<af:form id="f1">
<af:commandButton text="Add Column" id="cb1"
actionListener="#{EmployeesTableBean.onAddColumn}"/>
<af:table value="#{bindings.Employees.collectionModel}" var="row"
rows="#{bindings.Employees.rangeSize}"
emptyText="#{bindings.Employees.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.Employees.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.Employees.collectionModel.selectedRow}"
selectionListener="#{bindings.Employees.collectionModel.makeCurrent}"
rowSelection="single" id="t1"
binding="#{EmployeesTableBean.table}">
<af:column sortProperty="EmployeeId" sortable="false"
headerText="#{bindings.Employees.hints.EmployeeId.label}"
id="c1">
<af:outputText value="#{row.EmployeeId}" id="ot2">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.Employees.hints.EmployeeId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="FirstName" sortable="false"
headerText="#{bindings.Employees.hints.FirstName.label}"
id="c2">
<af:outputText value="#{row.FirstName}" id="ot1"/>
</af:column>
<af:column sortProperty="LastName" sortable="false"
headerText="#{bindings.Employees.hints.LastName.label}"
id="c3">
<af:outputText value="#{row.LastName}" id="ot3"/>
</af:column>
</af:table>
</af:form>
Bean:
public class EmployeesTableBean {
private RichTable table;
public EmployeesTableBean() {
public void setTable(RichTable table) {
this.table = table;
public RichTable getTable() {
return table;
public void onAddColumn(ActionEvent actionEvent) {
RichInputText newRichInputText = new RichInputText();
newRichInputText.setId("new");
newRichInputText.setValue("Name:");
RichColumn richcol = (RichColumn)table.getChildren().get(0);
richcol.getChildren().add(newRichInputText);
AdfFacesContext adfContext1 = AdfFacesContext.getCurrentInstance();
adfContext1.addPartialTarget(table);
Thanks,
Navaneeth -
Not having to refresh the data in the main report but only in the subreport
Hi SAP,
I have a report that uses a stored procedure in the main report and uses regular database tables in the subreport. The data returned from the stored procedure reports information from the month-end database (a cutoff point from the previous month's numbers) while the subreport reports information from the live database. This report gets run everyday to show the changes in numbers from the live database. Obviously the numbers from the month-end database remainds static until the next month's cutoff database is created.
My problem is that everyday when I run the report, the data needs to refresh from both the stored procedure in the main report and the live database tables in the subreport. How can I leave the data returned from the stored procedure static or as is without refreshing the stored procedure returned data and just have the subreport data refresh itself? The stored procedure really puts a strain on the database and I would like to cut-out the time to process the report as well. Does anyone have any ideas?
ZackHi Zack,
Try the following under Report options.
1. Clear the check box of "Verify Stored Procedures on First Refresh" in the Main report.
2. Select the check box of "Verify on First Refresh" in the sub report.
Hope this helps. -
Can not refresh ValueObject after altering database table
Hello All,
In FB4, in order to refresh a service, I used to
- select a service operation
- select configure return type
- select auto-detect
- hit next and on the follow page select the existing ValueObject
...it would update.
As far as I can see, this does not work in FB4.5. Instead, after selecting auto-detect and clicking next:
There was an error while invoking the operation. Check your operation inputs or server code and try invoking the operation again.
Reason: Warning: mysqli_stmt_bind_result(): Number of bind variables doesn't match number of fields in prepared statement in...
Is there a way to refresh a ValueObject. Clicking refresh is a no go.
Thanks for your help!
Jhey jay. did you ever figure out how to update your valueObject? I just posted a similar discussion "changing php-service in FD breaks AS3 service class and valueObjects" here: http://forums.adobe.com/thread/882288
maybe we'll get a reply.... -
Can not refresh contents of finder windows
I can not get my finder windows to refresh their contents. My picture folder is the one that really bothers me. When I am trying to upload pictures to the internet, the picture folder is never accurate. I have tried the refresh finder apple script, restarting the computer, opening and closing the window, nothing seems to work.
The content is there, when I search for a specific picture file it is there, but it is not located in the right subfolder. I download and manage my pictures on kodak easyshare.Hi there,
The content is there, when I search for a specific picture file it is there, but it is not located in the right subfolder.
Hmmm, are you saying something is moving them? Or the Finder isn't opening them to the right folder?
Have you tried this one...
http://www.versiontracker.com/dyn/moreinfo/macosx/10958253
Safe Boot, (holding Shift key down at bootup), & use Disk Utility from there to Repair Permissions, reboot once more.
Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions...
Move this file to the desktop...
/Users/YourUserName/Library/Preferences/com.apple.finder.plist
reboot when it completes. -
Can not refresh server manager Error:0x8007045b
OS: Windows 2012 R2 Core
Services: Hyper V
I was trying to remote reboot and the session hung. No worries I decided I could just reboot the next morning. So I rebooted the next day but when I go into server manager I get
an errror can not refresh server manager Error:0x8007045b. Did some research found suggestions to fix it using a DISM.exe /Online /Cleanup-image /Restorehealth.
But then I get an error 1115 A system Shutdown is in progress. I attempt to fix this issue using pskill winlogon but the issue pursistest. I have restarted the server several times now. Not sure how to fix this.
Thanks in advance,
JakeHi,
In addition to the above information,
Checkout the below thread for similar discussion,
http://social.technet.microsoft.com/forums/windowsserver/en-US/a700e9f6-4491-4c70-8bd0-d9d3111e2f70/windows-reboot-error
Regards,
Gopi
JiJi
Technologies -
Can not refresh page after save properly(When not saving master record)
I am using jdeveloper 11g R2 (11.1.2.3) JSF Facelet
In some use case I have Address as master table and Person as detail table
For some business reason I need to don't save same addresses
eg:
If +1 Test St+ is in database already and new user coming and adding this address with new person
I need to use the row in database not creating a new address
I do saving in doDML method of Address with some hashing algorithm and it is fine
My problem is that I can not refresh page after save properly
User coming to page think Adding a new address and a new person but in fact no new
address added because of business I describe above
Any ideas how I can implement this?
Appreciate that
Regards
MohsenHi,
from your description it is not clear why the page doesn't refresh. It could be a problem in your implementation code - who knows. What if you perform the address check on a command button that actually submits the new address? If the check returns true (address exists) you would call row.refresh(forget new row); and re-query the view object so the address coming from the database is displayed. If you wanted to use the doDML then yuou need to be aware that doDML doesn't help removing the row the user created. It just ignores the database update but the entity is still around, which in my suggested solution wont be the case.
Frank -
Refresh/Update data in a materialized view
Hi,
I have question about the data in a materialized view and how it is refreshed. My mat view has all my dimension-ids and my (for my specialize needs) aggregated measures from my fact table. I used the mat view wizard to create my view - which works perfectly. But now I wonder if I have to create some sort of mapping(?) or some sort of trigger to refresh the data in the mat view. Or is the data automatically refreshed when I start my fact table mappings. I use OWB 11gR2
thxMVs have properties for refresh - you an refresh based on schedules or when dependent data is committed or manually.
Cheers
David -
Can not refresh snapshot changes after importing data of master site
Hello !
I have two database computer,one as master site,one as snapshot site.Because the error of the hard disk of master computer,I use the exporting data file to recover my database.after importing ,I found I can't refresh the refreshgroup on snapshot,who can tell me why?
thinks in advance!
(exp system/manager full=y inctype=complete file='/home/save/backdata/xhsdcomp.dat')
(imp system/manager inctype=system full=Y file='/home/save/backdata/xhsdcomp.dat'
imp system/manager inctype=restore full=Y file='/home/save/backdata/xhsdcomp.dat')
nullYou haven't listed the errors that you're receiving when attempting to refresh your refresh group, but if your snapshots are attempting to fast refresh, I suspect it's because the creation timestamp of the snapshot log on the master site is newer than the creation timestamp of the snapshot. In this case you will need to do a complete refresh of the snapshot (or drop and recreate the snapshot) before you will be able to fash refresh it again.
If this is not the case, please post the errors you are receiving when you attempt to refresh the refresh group.
HTH,
-- Anita
Oracle Support Services
null -
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(); -
Can not refresh the metrics in schedular
Post Author: sachinddalal
CA Forum: Performance Management and Dashboards
Hi,
When I refresh the metric using schedular, the metric is not refreshed , nor schedular return any error. But when checked in metrics proparties, the last refresh date is not changed, niether the values are updated.
Whe I try to refresh the metric manual, the values are refresh.
Please help me to troubleshoot the problem of refreshing metric through schedular.
Thanks,
Regards
Sachin DalalPost Author: jezbraker
CA Forum: Performance Management and Dashboards
Scheduler is pretty horrid for refreshing metrics.Better of to use the Rules engine and create a rule thats based on a schedule that based on condition (1=1 works well ) then refreshes metircs.troubleshooting is best done with the trace options in setup/parameters.there are a few other ways or seeing what the schedulers up to - but id stick to rules if i were you.
Maybe you are looking for
-
Video Sync between iTunes and iPad with IOS 7.0.2 Never Completes
Hi, I travel a lot and load recorded content up to my iPad from iTunes on my MAC on a weekly basis. Everything worked fine until I upgraded my iPad-2 to IOS 7.0.2 and upgraded iTunes to 11.1. Now when I sync the iPad from iTunes, the sync hangs. Afte
-
Is split screen editing possible in FCP X?
Is split screen editing possible in FCP X? Many thanks! KJ
-
MIC update in QM - LIMS interface
Hi friends, I am working with QM - LIMS interface. I am getting a problem for characteristic update in SAP specifically for 04 lots. The detailed descriptuion is as follows: Plant: 1000; Tasklist Group: 1 Tasklist Usage: Universal ; so that my taskli
-
Hi experts, can someone explain me the field "Increment by" in transaction DB02 please. I go to DB02->Platz->Tablespaces->Overview->Data/Temp. Files and there i can see the field Increment By. I thought, that this is the size, which a data-file will
-
Can I insert an image over another image?
Hi there, I currently have a "contact me" hotspot link set up in the header of my web page that takes visiter to my contact page. I would like the button area to display a slightly lighter version of the button when it is hovered. Is there a way to